import http from '@/utils/request'
import {useUserStore} from '@/stores/user'

//获取数据
export const getMemberWallet = (pageQueryParams: any) => {
  return http.request({
    url: '/api/v1/front/wallet/getMemberWallet',
    method: 'get',
    params: pageQueryParams,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

//获取课程预约分页数据
export const courseReservePage = (pageQueryParams: any) => {
  return http.request({
    url: '/api/v1/front/profile/myCourseReserve',
    method: 'get',
    params: pageQueryParams,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export const walletRecharge = (rechargeAmount: any) => {
  return http.request({
    url: '/api/v1/front/wallet/recharge',
    method: 'get',
    params: rechargeAmount,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export const payment = (paymentParams: any) => {
  return http.request({
    url: '/api/v1/front/courseReserve/payment',
    method: 'get',
    params: paymentParams,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export const rechargeBillingPage = (paymentParams: any) => {
  return http.request({
    url: '/api/v1/front/wallet/rechargePage',
    method: 'get',
    params: paymentParams,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export const deleteBilling = (id: any) => {
  return http.request({
    url: '/api/v1/front/wallet/deleteBilling',
    method: 'delete',
    params: id,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}